/**
* +----------------------------------------------------------------------
* | 友得云客  - 开启房产营销新纪元
* +----------------------------------------------------------------------
* | Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
* +----------------------------------------------------------------------
* | Licensed 友得云客不是自由软件 未经允许不可移除相关版权
* +----------------------------------------------------------------------
* | Author: www.youdeyunke.com
* +----------------------------------------------------------------------
*/
import request from '@/utils/request'

export function getWebNoticeList (params) {
    return request({
        url: '/admin6/web_notice/list',
        method: 'get',
        params
    })
}

export function getWebNoticeDetail (id) {
    return request({
        url: '/admin6/web_notice/detail/' + id,
        method: 'get',
    })
}

export function getWebNoticeCat(){
    return request({
        url: '/admin6/web_notice/cats',
        method: 'get',
    })
}

export function readAllWebNotice () {
    return request({
        url: '/admin6/web_notice/readall',
        method: 'PATCH',
    })
}

export function readWebNotice (id) {
    return request({
        url: '/admin6/web_notice/read/' + id,
        method: 'PATCH',
    })
}

export function deleteWebNotice (id) {
    return request({
        url: '/admin6/web_notice/delete/' + id,
        method: 'delete',
    })
}

export function getWebNoticeNextOrFront (id, type) {
    return request({
        url: `/admin6/web_notice/next_or_front/${id}/${type}`,
        method: 'get',
    })
}

export function getUnreadNotice(){
    return request({
        url: '/admin6/web_notice/unread_count',
        method: 'get',
    })
}